function loadMedicineAndEquipmentForm(ticketId) {
	$.ajax({
		type: 	"GET",
		url:	"../TicketMedicine/LoadTicketMedicinePage?set_ajax_view",
		data: 	"ticketId=" + ticketId,
		dataType: "html",
		success: function(data) {
			$('#tabContent').html(data);
		}
	});		
}

function loadSurgeryForm(ticketId) {
		
	$.ajax({
		type:		"GET",
		url:	"../ServiceInput/LoadServiceSelectionAjax?set_ajax_view",
		data: 	"ticketId=" + ticketId,		
		dataType:   "json",
		success: 	function(data) {			
		if (data.error.code == 0) {
			$('#tabContent').html(data.result);
			//var serviceType = $("select#inputServiceSurgeryType :selected").val();
			displayForm4InputService(ticketId);

		} else {
			displayError(data.error.mess);				
		}

	}
	});	
	
}
function displayError(errorMess) {
	var buttons = {};
	buttons[_('Close')] = function() {
		$(this).dialog('close');		
	};
	generalDialog(null,_("Error"),errorMess,'error',{
		autoOpen: true,			
		bgiframe: true,
		resizable: true,
		modal: true,							
		buttons: buttons
	});
}
function loadTestForm(ticketId) {
	$.ajax({
		type:		"GET",
		url:	"../EmerTestDiagnosisTicket/LoadLabResultAjax?set_ajax_view",
		data: 	"ticketId=" + ticketId,		
		dataType:   "json",
		beforeSend: function() {
			showAjaxLoader('reloadInputTestResult', 'innerInputTestResult' , false);
		},
		success: 	function(data) {			
			
		if (data.error.code == 0) {
			$('#tabContent').html(data.result);
			
		} else {
			displayError(data.error.mess);				
		}
		
		showAjaxLoader('reloadInputTestResult', 'innerInputTestResult' , true);

	}
	});	
}

function loadInputForm(ticketId) {
	$.ajax({
		type: 	"GET",
		url: 	"../ResidentPatient/GetInputFormBody?set_ajax_view",
		data: 	"ticketId=" + ticketId,
		dataType: "html",
		success: function(data) {
			$('#inputFormContent').html(data);
		}	
	});
}

function loadRadForm(ticketId) {
    $.ajax({
        type:       "GET",
        url:    "../RadAssignment/LoadRadResultAjax?set_ajax_view",
        data:   "ticketId=" + ticketId,     
        dataType:   "json",
        beforeSend: function() {
            
        },
        success:    function(data) {            
            
        if (data.error.code == "OK") {
            $('#tabContent').html(data.result);
            
        } else {
            displayError(data.error.mess);              
        }        
    }
    }); 
}